package io.shallwe.common.config;

import com.jfinal.config.Routes;
import io.shallwe._admin.account.AccountAdminController;
import io.shallwe._admin.auth.AdminAuthInterceptor;
import io.shallwe._admin.basedata.init.InitHangerPositionController;
import io.shallwe._admin.basedata.location.LocationController;
import io.shallwe._admin.basedata.material.MaterialNoNameController;
import io.shallwe._admin.basedata.hangerframe.HangerFrameController;
import io.shallwe._admin.basedata.scanner.ScannerController;
import io.shallwe._admin.line.*;
import io.shallwe._admin.permission.PermissionAdminController;
import io.shallwe._admin.role.RoleAdminController;
import io.shallwe.history.LogTocController;
import io.shallwe.history.ParameterCurveController;
import io.shallwe.stovingoven.StovingOvenTemperatureController;

/***
 * 后台路由
 * @author 王小伟
 * @date  2019-07-18 19:51:10
 */
public class AdminRoutes extends Routes {

	@Override
	public void config() {
		// 添加后台管理拦截器，将拦截在此方法中注册的所有 Controller
		addInterceptor(new AdminAuthInterceptor());
		setBaseViewPath("/_view/_admin");
		add("/admin/account", AccountAdminController.class, "/account");
		add("/admin/role", RoleAdminController.class, "/role");
		add("/admin/permission", PermissionAdminController.class, "/permission");
		//上线扫描
		add("/admin/enterScan",EnterScanController.class,"/line/enterBuffer");
		//下线扫描
		add("/admin/exitScan",ExitScanController.class,"/line/exitBuffer");
		add("/admin/lineRack",LineRackController.class,"/line/rack");
		add("/admin/turnoverVehicle",TurnoverVehicleController.class,"line/turnover");
		add("/admin/vehicleHistory",TurnoverVehicleHistoryController.class,"line/turnover");
		
		//工艺点信息
		add("/admin/location",LocationController.class,"/baseData/location");
		add("/admin/scanner",ScannerController.class,"/baseData/scanner");
		add("/admin/initRackPosition", InitHangerPositionController.class,"/baseData/initRackPosition");
		add("/admin/rackFrame", HangerFrameController.class,"/baseData/rackFrame");
		add("/admin/logtoc",LogTocController.class,"/baseData/logToc");

		//炉温参数设置
		add("/admin/stovingOven", StovingOvenTemperatureController.class,"/baseData/stovingOven");
		add("/admin/history", ParameterCurveController.class,"/history");
		add("/admin/material", MaterialNoNameController.class,"/baseData/material");

	}
}